package me.qixiaobo.controller;

import io.swagger.annotations.ApiOperation;
import me.qixiaobo.dto.Result;
import me.qixiaobo.dto.User;
import me.qixiaobo.util.ResultGenerator;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author qixiaobo
 */
@RestController
@RequestMapping("user")
public class UserController {

    @GetMapping("/{id}")
    @ApiOperation(value = "获取用户", notes = "")
    public Result detail(@PathVariable Long id) {
        User user = new User();
        user.setId(id);
        return ResultGenerator.genSuccessResult(user);
    }
}
